﻿@using System.Data;
@using GatewayServer.Common;
@using UtilsBase;
@{
    ViewBag.PageTitle = "洪峰智能";

    Layout = "~/Views/Shared/PageTemplate.cshtml";
}

<script>
    $(document).ready(function () {



    });
    function saveCopy() {
        var data = $("#addForm").serializeArray(); //自动将form表单封装成json
        $.post("saveCopy", data, function (result) {
            var jsonresult = (result);

            if (jsonresult.respCode == "200") {
                alert("操作完成");
              //  $("#result").text("操作完成");
                window.location.href = "/Product/list";
              //  window.history.back();
                //alert("保存成功");
            }
            else {
                alert(jsonresult.respMsg);
                return;
            }
        });

    }
</script>

<style>
    #pagelist_follow {
        width: 100%;
    }

    #pagelist_main {
        width: 100%;
    }

    .kv-item label {
        width: 150px;
    }
</style>
<div id="saper-container">
    <form id="addForm" name="addForm" action="list" method="post">
        <input type="hidden" name="p_guid" id="p_guid" value="@ViewBag.p_guid" />
        <div id="saper-hd"></div>
        <div id="saper-bd">
            <div class="subfiled clearfix">
                <h2>复制产品</h2>
            </div>
            <div class="subfiled-content">

                <div id="" title="添加/编辑">
                    <form action="" name="addForm" id="addForm" method="post">
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>原产品编号：</label>
                            <div class="kv-item-content">
                                <label id="p_code" style="text-align:left">@(ViewBag.p_code)</label>
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>修改新的产品名称：</label>
                            <div class="kv-item-content">
                                <input type="text" name="p_name" id="p_name" placeholder="" value="@(ViewBag.p_name)" />
                            </div>
                        </div>


                        <div><hr /></div>
                        <div style="margin:0 auto;width:250px;">

                            <input type="button" id="save" name="save" value="生成新的产品配置" onclick="javascript:saveCopy()" />
                            &nbsp;&nbsp; <input type="button" id="but_back1" name="but_back1" value="返回" onclick="javascript:window.location.href='/Product/list'" />
                        </div>



                    </form>
                </div>
            </div>
        </div>
        <div id="saper-ft"></div>
    </form>
</div>

